Skip to content

[AI] What to change: The dropdown menu, where one can pick user category. - #203

Open
burkongla wants to merge 1 commit into
mainfrom
agent/slack-9f36b8f9-what-to-change-the-dropdown-menu-where-o
Open

[AI] What to change: The dropdown menu, where one can pick user category.#203
burkongla wants to merge 1 commit into
mainfrom
agent/slack-9f36b8f9-what-to-change-the-dropdown-menu-where-o

Conversation

@burkongla

Copy link
Copy Markdown
Contributor

Automated PR

Task: What to change: The dropdown menu, where one can pick user category.
Description: What to change: The dropdown menu, where one can pick user category.
• When a new user register itself, only the user category that the person registered for, should be shown in the dropdown menu. If a user is registered for multiple user categories, all relevant user categories should be shown. If a helper receives an invite to join a project as a helper, and is not registered for Githelp prior, only the category “Helper” should be visible in the dropdown menu, when the person has completed his/hers registration. This goes for all user groups.
Do not change: Anything else than what is listed.
Acceptance criteria: When all points listed under “Description and specific values” are implemented the task is done.
Source: slack
Requested by: U04E9DZ5ELF
Classification: flow

Changes

The role dropdown in the top bar currently offers roles hierarchically (admin implies helper+user, helper implies user). Change it to list only the categories the signed-in profile is actually registered for (admin membership, helper registration, support/member user), so e.g. an invited helper sees only "Helper" and a project creator sees only "Admin".

Security Review

Status: warn
No high-severity issues: no secrets, injection, XSS, or CORS changes, and all Supabase queries are parameterized builder calls governed by RLS. Two low advisories: unscoped 'user-roles' cache key could leak the previous account's role set across sign-ins, and role state remains client-trusted (pre-existing).

Warnings:

  • src/hooks/useProjectRole.ts: queryKey ["user-roles"] is not scoped to the user id and has a 30-minute staleTime. If a different account signs in within the same tab session without the React Query cache being cleared, the previous user's role set (e.g. admin) can be served from cache, briefly showing the wrong role options in the UI. Not a privilege escalation on its own (RLS/server enforces data access), but it's a UI/role-state leak across sessions.
  • src/components/layout/top-bar.tsx: Role selection (and the auto-switch useEffect) is entirely client-derived and persisted to localStorage via switchRole; the UI 'role' is trust-on-client. This is pre-existing design, but the diff reinforces it — ensure no page/Edge Function treats user.role as authoritative.

🤖 Generated by githelp-support agent team

…gory.

Task: 9f36b8f9
Source: slack
Requested by: U04E9DZ5ELF
@netlify

netlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploy Preview for githelp-support ready!

Name Link
🔨 Latest commit f888478
🔍 Latest deploy log https://app.netlify.com/projects/githelp-support/deploys/6a85e51ad9defb00082371ac
😎 Deploy Preview https://deploy-preview-203--githelp-support.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant